package com.dianping.cat.consumer.business.model.entity;

import com.dianping.cat.consumer.business.model.BaseEntity;
import com.dianping.cat.consumer.business.model.IVisitor;







public class Segment
  extends BaseEntity<Segment>
{
  private Integer m_id;
  private int m_count;
  private double m_sum;
  private double m_avg;

  public Segment() {}

/*  22 */   public Segment(Integer id) { this.m_id = id; }




/*  27 */   public void accept(IVisitor visitor) { visitor.visitSegment(this); }



  public boolean equals(Object obj) {
    if (obj instanceof Segment) {
/*  33 */       Segment _o = (Segment)obj;

/*  35 */       if (!equals(getId(), _o.getId())) {
        return false;
      }

/*  39 */       return true;
    }

/*  42 */     return false;
  }


/*  46 */   public double getAvg() { return this.m_avg; }



/*  50 */   public int getCount() { return this.m_count; }



/*  54 */   public Integer getId() { return this.m_id; }



/*  58 */   public double getSum() { return this.m_sum; }





  public Segment incCount() {
/*  71 */     this.m_count++;
/*  72 */     return this;
  }

  public Segment incCount(int count) {
/*  76 */     this.m_count += count;
/*  77 */     return this;
  }

  public Segment incSum() {
/*  81 */     this.m_sum++;
/*  82 */     return this;
  }

  public Segment incSum(double sum) {
/*  86 */     this.m_sum += sum;
/*  87 */     return this;
  }


  public void mergeAttributes(Segment other) {
/*  92 */     assertAttributeEquals(other, "segment", "id", this.m_id, other.getId());

/*  94 */     this.m_count = other.getCount();

/*  96 */     this.m_sum = other.getSum();

/*  98 */     this.m_avg = other.getAvg();
  }

  public Segment setAvg(double avg) {
/* 102 */     this.m_avg = avg;
/* 103 */     return this;
  }

  public Segment setCount(int count) {
/* 107 */     this.m_count = count;
/* 108 */     return this;
  }

  public Segment setId(Integer id) {
/* 112 */     this.m_id = id;
/* 113 */     return this;
  }

  public Segment setSum(double sum) {
/* 117 */     this.m_sum = sum;
/* 118 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/business/model/entity/Segment.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */